import {request} from "../utils/request";

export function page(page,size,SearchAndOrder){
    return request(
        {
            url: `/brand/page/${page}/${size}`,
            method:'post',
            data:SearchAndOrder
        }
    )
}



export function del(id){
    return request({
        url:'/brand/del',
        method:'delete',
        headers: {
            'Primary-key': id
        }
    })
}

/**
 * 删除多行数据
 * @param id
 * @returns {*}
 */

export function delBatch(ids){
    return request({
        url:'/brand/del/batch',
        method:'delete',
        data:ids
    })
}

/**
 * 修改当前行数据
 * @param data
 * @returns {Promise<AxiosResponse<any>>}
 */

export function edit(data){
    return request({
        url:'/brand/edit',
        method:'put',
        data
    })
}

/**
 * 新增
 * @param data
 * @returns {Promise<AxiosResponse<any>>}
 */

export function plus(data){
    return request({
        url:'/brand/plus',
        method:'post',
        data
    })
}